package com.irs.irsforum.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.irs.irsforum.entity.User;
import com.irs.irsforum.mapper.UserMapper;
import com.irs.irsforum.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yihuili
 * @since 2020-02-15
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public Integer setUser(User user) {
        Integer result = userMapper.setUser(user);
        return result;
    }

    @Override
    public User getUserByRoleOriginId(User user) {
        User userResult = userMapper.getUserByRoleOriginId(user);
        return userResult;
    }

    @Override
    public Integer updateUserNickName(User user) {
        Integer result = userMapper.updateUserNickeName(user);

        return result;

    }
}
